package day02;

public class IntDemo {
    public static void main(String[] args) {
        //1)int:整型,4个字节.-2^31~2^31-1(正负21亿多)
        int a = 25;//25为整数直接量,默认为int类型
        //int b = 10000000000;//编译错误,100亿默认为int类型,但超出范围了
        //int c =3.14;//编译错误,整型变量中只能装整数
        System.out.println(5/2);//2
        System.out.println(2/5);//0
        System.out.println(5/2.0);//2.5
        int d = 2147483647;//int的最大值
        d=d+1;
        System.out.println(d);//-2147483648(int的最小值)发生溢出了,需要避免

        int w=23;
        //int y=99999999999;
        //int r=2.1314;
        System.out.println(7/2);
        System.out.println(2/9);
        System.out.println(7.0/2);
        int g=2147483647;
        d= d+2;
        System.out.println(d);

        int j =90;
        //int yc=213.3;




    }
}
